package com.dxd.entity;

import java.io.Serializable;

/**
 * 信息管理
 * 
 * @author Administrator
 *
 */
public class Message implements Serializable {

	private static final long serialVersionUID = -2689508629357834185L;

	private Integer id;// 信息id

	private String title;// 消息标题

	private String firstImg;// 列表封面展示图片，取第一张

	private String imgs;// 多个以逗号隔开

	private MessageType messageType;// 留言类型

	private UserInfo createUse;// 创建人

	private String address;// 失物地点或者拾物地点

	private String createTime;// 创建时间

	private Integer state;// 0：待审核，1：待认领，2：寻找中 3：已关闭，4：已完成

	private String lostTime;// 拾物时间或丢失时间

	private String detailContent;// 消息详细内容

	private String stateStr;// 中文的状态

	private static String[] states = { "待审核", "待认领", "寻找中", "已关闭", "已完成" };

	public String getStateStr() {
		stateStr = states[state];
		return stateStr;
	}

	public void setStateStr(String stateStr) {
		this.stateStr = stateStr;
	}

	public String getFirstImg() {
		if (imgs != null && !"".equals(imgs)) {
			firstImg = imgs.split(",")[0];
		}
		return firstImg;
	}

	public void setFirstImg(String firstImg) {
		this.firstImg = firstImg;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getImgs() {
		return imgs;
	}

	public void setImgs(String imgs) {
		this.imgs = imgs;
	}

	public MessageType getMessageType() {
		return messageType;
	}

	public void setMessageType(MessageType messageType) {
		this.messageType = messageType;
	}

	public UserInfo getCreateUse() {
		return createUse;
	}

	public void setCreateUse(UserInfo createUse) {
		this.createUse = createUse;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getLostTime() {
		return lostTime;
	}

	public void setLostTime(String lostTime) {
		this.lostTime = lostTime;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getDetailContent() {
		return detailContent;
	}

	public void setDetailContent(String detailContent) {
		this.detailContent = detailContent;
	}

}
